package com.moss.system.mapper;

import com.moss.common.entity.SysPostEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PostMapper {


    List<SysPostEntity> selectList(@Param("p") SysPostEntity post);

    SysPostEntity selectPostByName(String postName);

    SysPostEntity selectPostByCode(String postCode);

    void insert(@Param("p") SysPostEntity post);

    SysPostEntity selectById(Long postId);

    void updateById(@Param("p") SysPostEntity post);

    int countUserByPost(Long postId);

    void deleteBatchIds(@Param("list") Long[] postIds);

    List<Long> selectPostIdListByUserId(String userId);
}
